package org.thotheolh.sweatkeeper;

import java.io.File;

import org.thotheolh.sweatkeeper.db.SQLManager;
import org.thotheolh.sweatkeeper.util.Resource;

public class Main {
	
	public static void main(String[] args){
		File locFile = new File("");
		String baseDir = locFile.getAbsolutePath().toString();		
		SQLManager sql = new SQLManager(baseDir);
		Resource.getInstance().setSql(sql);
		if (sql.isConnected()){
			System.out.println("Connection established...\nStarting GUI...");
			org.thotheolh.sweatkeeper.ui.Main mainUI = new org.thotheolh.sweatkeeper.ui.Main();
			mainUI.show();
			Resource.getInstance().setMainUI(mainUI);
		} else {
			System.out.println("Connection failed !!!");
		}
		
		
	}

}
